package com.sirun.cn.fca.module.main;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.sirun.cn.fca.module.main.feature.MainFeatureEnum;
import com.sirun.cn.fca.module.main.feature.MainFeatureFactory;

/**
 * @author showxiao
 * @date 2018/6/14
 */

class MainPagerAdapter extends FragmentPagerAdapter {

    MainPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return MainFeatureFactory.createItem(position);
    }

    @Override
    public int getCount() {
        return MainFeatureEnum.values().length;
    }
}
